(function(){"use strict";BX.namespace("BX.Landing.UI.Button");BX.Landing.UI.Button.CreateTable=function(t,e){BX.Landing.UI.Button.EditorAction.apply(this,arguments);this.editPanel=null;this.options=e;this.id=t};BX.Landing.UI.Button.CreateTable.prototype={constructor:BX.Landing.UI.Button.CreateTable,__proto__:BX.Landing.UI.Button.EditorAction.prototype,onClick:function(t){t.preventDefault();t.stopPropagation();var e="rgb(51, 51, 51)";var n="#333333";var a=this.contextDocument.createElement("div");a.classList.add("landing-table-container");var d=this.contextDocument.createElement("table");d.classList.add("landing-table","landing-table-style-1");d.setAttribute("text-color",n);var l=this.contextDocument.createElement("tr");l.classList.add("landing-table-tr");var i=this.contextDocument.createElement("tr");i.classList.add("landing-table-tr");var o=this.contextDocument.createElement("th");o.classList.add("landing-table-th","landing-table-row-dnd");var r=this.contextDocument.createElement("div");r.classList.add("landing-table-row-add");var c=this.contextDocument.createElement("div");c.classList.add("landing-table-row-add-line");var s=this.contextDocument.createElement("div");s.classList.add("landing-table-div-row-dnd");r.appendChild(c);var h=this.contextDocument.createElement("td");h.classList.add("landing-table-th","landing-table-td");var u=this.getCellWidth();h.style.width=u+"px";h.style.color=e;var v=this.contextDocument.createElement("th");v.classList.add("landing-table-th","landing-table-col-dnd");v.style.width=u+"px";var p=this.contextDocument.createElement("div");p.classList.add("landing-table-div-col-dnd");var m=this.contextDocument.createElement("div");m.classList.add("landing-table-col-resize");var g=this.contextDocument.createElement("div");g.classList.add("landing-table-col-add");var b=this.contextDocument.createElement("div");b.classList.add("landing-table-col-add-line");g.appendChild(b);var C=this.contextDocument.createElement("th");C.classList.add("landing-table-th","landing-table-th-select-all");C.style.width="16px";var x=this.contextDocument.createElement("div");x.classList.add("th-tech-icon");l.appendChild(C.cloneNode(true));for(var L=0;L<=3;L++){l.appendChild(v.cloneNode(true))}i.appendChild(o.cloneNode(true));for(var L=0;L<=3;L++){i.appendChild(h.cloneNode(true))}d.appendChild(l.cloneNode(true));for(var L=0;L<=3;L++){d.appendChild(i.cloneNode(true))}a.appendChild(d);var f=this.contextDocument.createElement("div");a.id="new-table";f.appendChild(a);this.contextDocument.execCommand("insertHTML",null,f.innerHTML);var E=this.contextDocument.getElementById("new-table");var D=E.querySelector(".landing-table-th-select-all");if(D.firstChild){D.firstChild.remove()}D.appendChild(x.cloneNode(true));var B=E.querySelectorAll(".landing-table-col-dnd");B.forEach((function(t){if(t.firstChild){t.firstChild.remove()}t.appendChild(p.cloneNode(true));t.appendChild(m.cloneNode(true));t.appendChild(g.cloneNode(true))}));var N=E.querySelectorAll(".landing-table-row-dnd");N.forEach((function(t){if(t.firstChild){t.firstChild.remove()}t.appendChild(r.cloneNode(true));t.appendChild(s.cloneNode(true))}));E.removeAttribute("id");BX.Landing.Block.Node.Text.currentNode.onChange(true)},getCellWidth:function(){var t=250;var e=1e3;var n=57;var a=4;var d=t;var l=BX.Landing.Block.Node.Text.currentNode.node.getBoundingClientRect().width;if(l<e){d=Math.floor((l-n)/a)}return d}}})();
//# sourceMappingURL=create_table.map.js